package com.ruoyi.project.system.uflo.model.dto;

import java.util.Date;

import com.bstek.uflo.model.HistoryTask;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.framework.web.model.dto.BaseDTO;

import lombok.Data;

/**
 * 历史任务
 * @author xianz
 *
 */
@Data
public class HistoryTaskDTO  extends BaseDTO{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6301606243795308357L;

	private String nodeName;
	
	private String description;
	
	private long processId;

	private String state;
	
	private String taskName;
	
	private Date createDate;

	private Date endDate;
	
	private String owner;
	
	private String assignee;

	private String type;
	
	private Date duedate;
	
	private long historyProcessInstanceId;
	
	private long processInstanceId;
	
	private long rootProcessInstanceId;
	
	private long taskId;
	
	private String opinion;

	private String url;

	private String businessId;
	
	private String subject;
	
	
	public static HistoryTaskDTO historyTaskToHistoryTaskDTO(HistoryTask historyTask) {
		HistoryTaskDTO historyTaskDTO = new HistoryTaskDTO();
		BeanUtils.copyPropertiesFilterNull(historyTask, historyTaskDTO, new String[] {});
		historyTaskDTO.setState(historyTask.getState().name());
		historyTaskDTO.setType(historyTask.getType().name());
		return historyTaskDTO;
	}
	
}
